package com.soda.service.impl;

import java.util.List;

import com.soda.bean.Course;
import com.soda.bean.Industry;
import com.soda.bean.News;
import com.soda.bean.Notice;
import com.soda.bean.Student;
import com.soda.bean.Survey;
import com.soda.dao.QianTaiCourseDao;
import com.soda.dao.impl.QianTaiCourseDaoImpl;
import com.soda.service.QianTaiCourseServiceYu;

public class QianTaiCourseServiceYuImpl implements QianTaiCourseServiceYu {

	QianTaiCourseDao qtcd = new QianTaiCourseDaoImpl();

	// 查询前台也页面要显示在线课程的名称
	public List<Course> selectZaiXianCourseNameByCouType(int type) {
		// TODO Auto-generated method stub
		return qtcd.selectZaiXianCourseNameByCouType(type);
	}

	public List<Course> selectZaiXianCourseByCouName(String couName, int page,
			int per, String couname, int type) {
		// TODO Auto-generated method stub
		return qtcd.selectZaiXianCourseByCouName(couName, page, per, couname,
				type);
	}

	public int getTotalCount(String couName, String couname, int couType) {
		// TODO Auto-generated method stub
		return qtcd.getTotalCount(couName, couname, couType);
	}

	public Course selectZaiXianShopingById(int i, int page, int per) {
		// TODO Auto-generated method stub
		return qtcd.selectZaiXianShopingById(i, page, per);
	}

	public int getTotalCountById(int parseInt) {
		// TODO Auto-generated method stub
		return qtcd.getTotalCountById(parseInt);
	}

	public List<News> selectNewsTitleByCouName() {
		// TODO Auto-generated method stub
		return qtcd.selectNewsTitleByCouName();
	}

	public List<Industry> selectIndustryTitleByIndName() {
		// TODO Auto-generated method stub
		return qtcd.selectIndustryTitleByIndName();
	}

	public List<Survey> selectSurveyContent() {
		// TODO Auto-generated method stub
		return qtcd.selectSurveyContent();
	}

	public void updateCoustateByCouid(int couid, Student stu) {
		// TODO Auto-generated method stub
		qtcd.updateCoustateByCouid(couid, stu);
	}

	public List<Integer> getCouIdByStudentId(int stuId) {
		// TODO Auto-generated method stub
		return qtcd.getCouIdByStudentId(stuId);
	}

	// 查询登陆的学生在他的未结算课程里面是否有他的未结算课程
	public List<Integer> selectStudentFromscCourseByStudent(Student student) {
		// TODO Auto-generated method stub
		return qtcd.selectStudentFromscCourseByStudent(student);
	}

	// 若这个学生的课程里有课，判断这么课的状态 是否未结算 在线视频0未结算 1已结算
	public int selectCourseStateByStuCourseId(int couId, int stuid) {
		// TODO Auto-generated method stub
		return qtcd.selectCourseStateByStuCourseId(couId, stuid);
	}

	// 查询学生的课程 放入到List<Course> 中
	public Course selectInfoOfCourseBycouId(int parseInt) {
		// TODO Auto-generated method stub
		return qtcd.selectInfoOfCourseBycouId(parseInt);
	}

	// 查询中间表课程
	public List<Course> selectCousFromStuCourseByStuId(int stuId) {
		// TODO Auto-generated method stub
		return qtcd.selectCousFromStuCourseByStuId(stuId);
	}

	// 更改学生的钱数
	public void updateStuMoneyByStuId(int stuId, int money) {
		// TODO Auto-generated method stub
		qtcd.updateStuMoneyByStuI(stuId, money);
	}

	// 更改中间表中这门课这门课的状态为已购买
	public void updateCourseFromStuCourseStateByCouId(int parseInt) {
		// TODO Auto-generated method stub
		qtcd.updateCourseFromStuCourseStateByCouId(parseInt);
	}

	public News selectNewseByNewsName(int newId) {
		// TODO Auto-generated method stub
		return qtcd.selectNewseByNewsName(newId);
	}

	// courseInfo
	public Course getCourseInfoBycouName(int couid) {
		// TODO Auto-generated method stub
		return qtcd.getCourseInfoBycouName(couid);
	}

	public void deleteInfoOfCourseBycouId(int parseInt) {
		// TODO Auto-generated method stub
		qtcd.deleteInfoOfCourseBycouId(parseInt);
	}

	// 根据 学生的id 在stu_course表里面查询我的课程的id(包括模糊搜索)
	public List<Course> selectCourseOfBughtById(int stuId, String couName,
			int page, int per) {
		// TODO Auto-generated method stub
		return qtcd.selectCourseOfBughtById(stuId, couName, page, per);
	}

	// 查询未结算课程总条数(包括搜索)
	public int getWeiJieCourseTotalCount(int stuId, String couname) {
		// TODO Auto-generated method stub
		return qtcd.getWeiJieCourseTotalCount(stuId, couname);
	}

	// 查询我的课程总条数
	public int selectCondiTotalCount(String couName, int stuId) {
		// TODO Auto-generated method stub
		return qtcd.selectCondiTotalCount(couName, stuId);
	}

	// *****查询未结算课程里面的课程(包括模糊)*****
	public List<Course> selectWeiJieSuanCourseByPage(int stuId, String couname,
			int page, int per) {
		// TODO Auto-generated method stub
		return qtcd.selectWeiJieSuanCourseByPage(stuId, couname, page, per);
	}

	// *****判断课程下架否(包括模糊)*****
	public Course selectCourseByStucouId(int couId) {
		// TODO Auto-generated method stub
		return qtcd.selectCourseByStucouId(couId);
	}

	public Notice selectNoticeByNewsName(int notId) {
		// TODO Auto-generated method stub
		return qtcd.selectNoticeByNewsName(notId);
	}

	public Industry selectIndustryByNewsName(int indId) {
		// TODO Auto-generated method stub
		return qtcd.selectIndustryByNewsName(indId);
	}
	// 查询现场课程   或者在线视频的课程总条数(包括模糊查询)
	public int getTotalCount(int coutype) {
		// TODO Auto-generated method stub
		return qtcd.getTotalCount( coutype);
	}

	public List<Course> selectAllCourseByCouName(int parseInt ,int page ,int per) {
		// TODO Auto-generated method stub
		return qtcd.selectAllCourseByCouName( parseInt ,page , per);
	}

}
